﻿@{
    Layout = null;
}
@using ZHJ.PerfectOA.WebApp.Models
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <style type="text/css">
        .search-text2 {
            display: block;
            width: 528px;
            height: 26px;
            line-height: 26px;
            float: left;
            margin: 3px 5px;
            border: 1px solid #808080;
            font-family: 'Microsoft Yahei';
            font-size: 14px;
        }

        .search-btn2 {
            width: 102px;
            height: 32px;
            line-height: 32px;
            cursor: pointer;
            border: 0px;
            background-color: #d6000f;
            font-family: 'Microsoft Yahei';
            font-size: 16px;
            color: #f3f3f3;
        }

        .search-list {
            width: 600px;
            overflow: hidden;
            margin: 10px 20px 0px 20px;
        }

            .search-list dt {
                font-family: 'Microsoft Yahei';
                font-size: 16px;
                line-height: 20px;
                margin-bottom: 7px;
                font-weight: normal;
            }

                .search-list dt a {
                    color: #2981a9;
                }

                    .search-list dt a em {
                        font-style: normal;
                        color: #cc0000;
                    }

        body {
            background-color: #f3f3f3;
        }

        .search-list-con {
            width: 640px;
            background-color: #fff;
            overflow: hidden;
            margin-top: 0px;
            padding-bottom: 15px;
            padding-top: 5px;
        }
    </style>
    <link href="~/Content/themes/base/jquery.ui.all.css" rel="stylesheet" />

    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <script src="~/Scripts/jquery-ui-1.8.24.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#txtSearchMsg").autocomplete({
                source: "/Search/GetSearchMsg"
            });
        });
    </script>
</head>
<body>
    <form method="get" action="/Search/SearchContent">
        <input type="text" id="txtSearchMsg" name="txtMsg" class="search-text2" value="@ViewData["searchWhere"] " />
        <input type="submit" value="搜一搜" name="btnSearch" class="search-btn2" />
          <input type="submit" value="创建索引库" name="btnCreate" />
    </form>
    <br />
    @if (ViewData["searchResult"] != null)
    {
        <div class="search-list-con">
            <dl class="search-list">
                @foreach (ViewModelSearchResult result in (List<ViewModelSearchResult>)ViewData["searchResult"])
                {
                    <dt><a href="@result.Url"> @result.Title</a></dt>
                    <dd>@MvcHtmlString.Create(result.Msg)</dd>
                }
            </dl>
        </div>
    }
</body>
</html>
